// https://www.luogu.com.cn/problem/B2077

#include <stdio.h>


int main() {
    long n;
    scanf("%ld", &n);
    while (n > 1) {
        long t;
        if (n & 1) {
            t = 3 * n + 1;
            printf("%ld*3+1=%ld\n", n, t);
        } else {
            t = n / 2;
            printf("%ld/2=%ld\n", n, t);
        }
        n = t;
    }
    printf("End");
    return 0;
}